<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Add for Employee</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/index_work.css">
</head>
<body>
<form action="${pageContext.request.contextPath}/employee" method="post">
<table>
    <tr>
        <th colspan="2">Add Table</th>
    </tr>
    <tr>
        <td>lastName</td>
        <td>
            <input type="text" name="lastName">
        </td>
    </tr>
    <tr>
        <td>email</td>
        <td>
            <input type="email" name="email">
        </td>
    </tr>
    <tr>
        <td>gender</td>
        <td>
            <input type="radio" name="gender" value="0">女
            <input type="radio" name="gender" value="1">男
        </td>
    </tr>
    <tr>
        <td>department</td>
        <td>
            <select name="department.id">
                <c:forEach items="${requestScope.departments}" var="department">
                    <option value="${pageScope.department.id}">${pageScope.department.departmentName}</option>
                </c:forEach>
            </select>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <input type="submit" value="Add">
        </td>
    </tr>
</table>
</form>
</body>
</html>
